<template>
  <div class="erc">
    <div class="head">
      <img src="img/zjt.png" @click="fun()" />
      <img src="img/yp1.png" />
      <img src="img/yp2.png" />
    </div>

    <van-tabs
      class="bar"
      background="linear-gradient(to right, rgb(255, 51, 102), rgb(255, 51, 18))"
      color="white"
      title-inactive-color="white"
      title-active-color="white"
    >
      <van-tab v-for="(v,i) in title" :title="v" :key="i">
        <!-- {{ v }} -->
        <!-- ------------------ -->
        <div style>
          <div
            class="con"
            style="background:linear-gradient(to right, rgb(255, 51, 102), rgb(255, 51, 18));display:flex;flex-wrap: wrap;"
          >
            <div
              class="item"
              style="width:1.7rem;height:2.5rem;background-color:white;margin-top:0.05rem;"
            >
              <img src="img/dd.png" />
              <p>欧伟士智能取暖器</p>
              <div class="pri">低至4.8折</div>
              <div class="price">￥799</div>
            </div>

            <div
              class="item"
              style="width:1.7rem;height:2.5rem;background-color:white;margin-top:0.05rem;"
            >
              <img src="img/dd.png" />
              <p>欧伟士智能取暖器</p>
              <div class="pri">低至4.8折</div>
              <div class="price">￥799</div>
            </div>

            <div
              class="item"
              style="width:1.7rem;height:2.5rem;background-color:white;margin-top:0.05rem;"
            >
              <img src="img/dd.png" />
              <p>欧伟士智能取暖器</p>
              <div class="pri">低至4.8折</div>
              <div class="price">￥799</div>
            </div>

            <div
              class="item"
              style="width:1.7rem;height:2.5rem;background-color:white;margin-top:0.05rem;"
            >
              <img src="img/dd.png" />
              <p>欧伟士智能取暖器</p>
              <div class="pri">低至4.8折</div>
              <div class="price">￥799</div>
            </div>

            <div
              class="item"
              style="width:1.7rem;height:2.5rem;background-color:white;margin-top:0.05rem;"
            >
              <img src="img/dd.png" />
              <p>欧伟士智能取暖器</p>
              <div class="pri">低至4.8折</div>
              <div class="price">￥799</div>
            </div>

            <div
              class="item"
              style="width:1.7rem;height:2.5rem;background-color:white;margin-top:0.05rem;"
            >
              <img src="img/dd.png" />
              <p>欧伟士智能取暖器</p>
              <div class="pri">低至4.8折</div>
              <div class="price">￥799</div>
            </div>

            <div
              class="item"
              style="width:1.7rem;height:2.5rem;background-color:white;margin-top:0.05rem;"
            >
              <img src="img/dd.png" />
              <p>欧伟士智能取暖器</p>
              <div class="pri">低至4.8折</div>
              <div class="price">￥799</div>
            </div>

            <div
              class="item"
              style="width:1.7rem;height:2.5rem;background-color:white;margin-top:0.05rem;"
            >
              <img src="img/dd.png" />
              <p>欧伟士智能取暖器</p>
              <div class="pri">低至4.8折</div>
              <div class="price">￥799</div>
            </div>
          </div>
        </div>

        <!-- ------------------ -->
      </van-tab>
    </van-tabs>

  </div>
</template>

<script>
export default {
  data() {
    return {
      title: [
        "首页",
        "采暖家电",
        "服饰穿戴",
        "运动出行",
        "个护健康",
        "日用百货",
        "智能数码",
        "家纺餐厨"
      ]
    };
  },
  methods: {
    fun() {
      this.$router.push("/home");
    }
  }
};
</script>

<style scoped>
.head {
  background: linear-gradient(to right, rgb(255, 51, 102), rgb(255, 51, 18));
  width: 100%;
  height: 0.44rem;
  display: flex;
  justify-content: space-between;
}
.head img {
  position: relative;
  z-index: 22;
}
.head img:nth-child(1) {
  width: 0.32rem;
  height: 0.32rem;
  margin-top: 0.06rem;
  margin-left: 0.1rem;
}
.head img:nth-child(2) {
  width: 0.91rem;
  height: 0.24rem;
  margin-top: 0.08rem;
}
.head img:nth-child(3) {
  width: 0.32rem;
  height: 0.32rem;
  margin-top: 0.06rem;
  margin-right: 0.08rem;
}
.con img {
  width: 1.7rem;
  height: 1.7rem;
}
.con p {
  color: rgba(0, 0, 0, 0.8);
  font-size: 16px;
  line-height: 23px;
  margin-top: -20px;
  padding-right: 9px;
  padding-left: 12px;
  text-align: left;
}
.item {
  border-radius: 0.1rem;
  margin-left: 0.12rem;
}
.item .pri {
  border-color: rgb(255, 156, 139);
  border-radius: 2px;
  border-width: 1px;
  height: 14px;
  margin-top: 4px;
  margin-left: 10px;
  padding-right: 3px;
  padding-left: 3px;
  color: rgb(250, 64, 11);
  font-size: 10px;
  line-height: 17px;
  width: 55px;
  border: 1px solid rgb(250, 64, 11);
}
.item .price {
  font-size: 0.16rem;
  font-family: PingFangSC-Regular;
  font-size: 18px;
  margin-top: 2px;
  margin-left: 0.08rem;
}
</style>